|
Controlled grammars〔Dassow, J., Pǎun, Gh., and Salomaa, A. Grammars with Controlled Derivations. In G. Rozenberg and A. Salomaa (Eds.) ''Handbook of Formal Languages'', Vol. 2, Ch. 3.〕 are a class of grammars that extend, usually, the context-free grammars with additional controls on the derivations of a sentence in the language. A number of different kinds of controlled grammars exist, the four main divisions being Indexed grammars, grammars with prescribed derivation sequences, grammars with contextual conditions on rule application, and grammars with parallelism in rule application. Because indexed grammars are so well established in the field, this article will address only the latter three kinds of controlled grammars. ==Control by prescribed sequences== Grammars with prescribed sequences are grammars in which the sequence of rule application is constrained in some way. There are four different versions of prescribed sequence grammars: language controlled grammars (often called just controlled grammars), matrix grammars, vector grammars, and programmed grammars. In the standard context-free grammar formalism, a grammar itself is viewed as a 4-tuple, , where ''N'' is a set of non-terminal/phrasal symbols, ''T'' is a disjoint set of terminal/word symbols, ''S'' is a specially designated start symbol chosen from ''N'', and ''P'' is a set of production rules like , where ''X'' is some member of ''N'', and is some member of . Productions over such a grammar are sequences of rules in ''P'' that, when applied in order of the sequence, lead to a terminal string. That is, one can view the set of imaginable derivations in ''G'' as the set , and the language of ''G'' as being the set of terminal strings . Control grammars take seriously this definition of the language generated by a grammar, concretizing the set-of-derivations as an aspect of the grammar. Thus, a prescribed sequence controlled grammar is at least approximately a 5-tuple where everything except ''R'' is the same as in a CFG, and ''R'' is an infinite set of valid derivation sequences . The set ''R'', due to its infinitude, is almost always (though not necessarily) described via some more convenient mechanism, such as a grammar (as in language controlled grammars), or a set of matrices or vectors (as in matrix and vector grammars). The different variations of prescribed sequence grammars thus differ by how the sequence of derivations is defined on top of the context-free base. Because matrix grammars and vector grammars are essentially special cases of language controlled grammars, examples of the former two will not be provided below. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Controlled grammar」の詳細全文を読む スポンサード リンク
|